package o;

import androidx.annotation.NonNull;
import java.util.HashMap;
import java.util.Map;
import o.sl.e;

public class sn {
    private static final e<?> ˎ = new e<Object>() {
        @NonNull
        public sl<Object> ˊ(@NonNull Object obj) {
            return new b(obj);
        }

        @NonNull
        public Class<Object> ˋ() {
            throw new UnsupportedOperationException("Not implemented");
        }
    };
    private final Map<Class<?>, e<?>> ˊ = new HashMap();

    static final class b implements sl<Object> {
        private final Object ˏ;

        b(@NonNull Object obj) {
            this.ˏ = obj;
        }

        @NonNull
        public Object ˏ() {
            return this.ˏ;
        }

        public void ˊ() {
        }
    }

    public synchronized void ˋ(@NonNull e<?> eVar) {
        this.ˊ.put(eVar.ˋ(), eVar);
    }

    @NonNull
    public synchronized <T> sl<T> ˎ(@NonNull T t) {
        e eVar;
        aas.ˎ(t);
        eVar = (e) this.ˊ.get(t.getClass());
        if (eVar == null) {
            for (e eVar2 : this.ˊ.values()) {
                if (eVar2.ˋ().isAssignableFrom(t.getClass())) {
                    eVar = eVar2;
                    break;
                }
            }
        }
        if (eVar == null) {
            eVar = ˎ;
        }
        return eVar.ˊ(t);
    }
}
